package com.example.zjsr.dao;

import com.example.zjsr.domain.Comment;
import com.example.zjsr.domain.Question;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;

@Mapper
public interface QuestionDao {
    int insert(Question question);

    Question selectById(Integer id);

    Question selectAll(Integer id);

    List<Question> selectByParams(Question question);

    int deleteById(Integer id);

    int update(Question question);

    List<Question> findAll(Integer roleId);

    List<Comment> getComments(@Param("id") Integer id,@Param("roleId") Integer roleId);

    /**
     * 审核通过，则展示
     * @return
     */
    boolean checkQuestion(Integer id);
}
